﻿<Window x:Class="VideoClient.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:Controls="clr-namespace:WPFMediaKit.DirectShow.Controls;assembly=WPFMediaKit"
        Title="MainWindow" Width="640" Height="250">
    <StackPanel Orientation="horizontal">
        <StackPanel>
        <Controls:VideoCaptureElement HorizontalAlignment="Stretch" DesiredPixelWidth="320"
                                                  DesiredPixelHeight="240" EnableSampleGrabbing="true" NewVideoSample="VideoCapture_NewVideoSample"
                                                  VideoCaptureDevice="{Binding Path=SelectedItem, ElementName=videoCapDevices}"
                                                  x:Name="videoElement" Stretch="Fill" />
        <ComboBox x:Name="videoCapDevices"
                          ItemsSource="{Binding Source={x:Static Controls:MultimediaUtil.VideoInputDevices}}"
                          DisplayMemberPath="Name" SelectedIndex="0" Height="25" VerticalContentAlignment="Center"/>
            <Button Content="Properties" Click="PropertiesClicked"/>
    </StackPanel>
    <Image x:Name="receivedImage" Width="{Binding ElementName=videoElement, Path=Width}" Height="{Binding ElementName=videoElement, Path=Height}"/>
    </StackPanel>
</Window>
